import cv2

frameWidth = 640
frameHeight = 480

cap = cv2.VideoCapture(0)
cap.set(3,frameWidth)
cap.set(4,frameHeight)
cap.set(10,150)
while cap.isOpened():
    ret,frame = cap.read()
    frame = cv2.flip(frame,1)
    cv2.namedWindow("video")
    cv2.imshow("video",frame)

    if cv2.waitKey(1) & 0xfff == ord('q'):
        break


cap.release()
cv2.destroyAllWindows()
